<template>
  <avue-form :option="option"
             v-model="form">
  </avue-form>
</template>
<script>
export default {
  data () {
    return {
      form: {
        array: [{ label: '名称.jpg', value: '/images/logo-bg.jpg' }],
        array1: [{ name: '名称.jpg', url: '/images/logo-bg.jpg' }],
        string: '/images/logo-bg.jpg,/images/logo-bg.jpg'
      },
      option: {
        labelWidth: 120,
        column: [
          {
            label: '数组对象',
            prop: 'array',
            dataType: 'object',
            type: 'upload',
            propsHttp: {
              res: 'data'
            },
            span: 24,
            action: 'https://api.avuejs.com/imgupload'
          },
          {
            label: '数组对象',
            prop: 'array1',
            dataType: 'object',
            type: 'upload',
            props: {
              label: 'name',
              value: 'url'
            },
            propsHttp: {
              res: 'data'
            },
            span: 24,
            action: 'https://api.avuejs.com/imgupload'
          },
          {
            label: '字符串',
            prop: 'string',
            dataType: 'string',
            type: 'upload',
            propsHttp: {
              res: 'data'
            },
            span: 24,
            action: 'https://api.avuejs.com/imgupload'
          }
        ]
      }
    }
  }
}
</script>